package main

import (
	"github.com/EndlessCheng/codeforces-go/main/testutil"
	"testing"
)

func TestCF1313B(t *testing.T) {
	// just copy from website
	rawText := `
input
1
5 1 3
output
1 3

input
1
6 3 4
output
2 6

input
25
5 1 1
5 2 3
5 5 5
5 5 1
5 4 4
10 1 2
10 3 7
10 10 10
10 3 1
10 7 6
1000000 21232 1234
999999 999999 999999
1000000 300001 701321
1000000 290001 679121
500000 98765 123456
100 1 1
1000000000 1 1000000000
1000000000 1 500000000
100000000 1 12345678
1000000000 1 499999999
1000000000 1 1
1000000000 727147900 673366700
1000000000 525064181 561222627
1000000000 198446857 735445702
1000000000 1000000000 1000000000
output
1 1
1 4
5 5
2 5
4 5
1 2
1 9
10 10
1 3
4 10
1 22465
999999 999999
1323 1000000
1 969121
1 222220
1 1
2 1000000000
1 500000000
1 12345678
1 499999999
1 1
400514601 1000000000
86286809 1000000000
1 933892558
1000000000 1000000000`
	testutil.AssertEqualCase(t, rawText, 0, CF1313B)
}
